<?php

namespace App\Providers;

use App\Models\MainDB\UserRoom;
use App\Repositories\AuctionRepository;
use App\Repositories\ActionHookRepository;
use App\Repositories\ConfigRepository;
use App\Repositories\ProtectRepository;
use App\Repositories\WeekStarRepository;
use App\Repositories\BadgeRepository;
use App\Repositories\RewardRepository;
use App\Repositories\Task\EveryDayTaskRepository;
use App\Repositories\Task\TaskRepository;
use App\Repositories\TreasureLogRepository;
use App\Repositories\GameEntranceRepository;
use App\Repositories\MallProductsRepository;
use App\Repositories\Task\NewPlayerTaskRepository;
use App\Repositories\Task\TaskUpdateRepository;
use App\Repositories\UserRepository;
use App\Repositories\ArticleRepository;
use App\Repositories\AccountLogRepository;
use App\Repositories\AdRepository;
use App\Repositories\RegionRoomRepository;
use App\Repositories\UserDataRepository;
use Illuminate\Support\ServiceProvider;
use App\Repositories\{ConnectionRepository};

//资质数据仓库
use App\Repositories\{Activity\AccumulateRechargeRepository,
    Activity\ActivitySignRepository,
    Activity\NewYearRepository,
    AddPoolFantasyRepository,
    AddPoolFragRepository,
    AddPoolGashaponRepository,
    AddPoolRepository,
    AddPoolSeniorRepository,
    AddPoolStellarRepository,
    ConnectRepository,
    FeedBackRepository,
    FollowRepository,
    FriendRepository,
    AboutRepository,
    Game\Lucky\StrikeRepositories,
    GiftRepository,
    LisenceRepository,
    NobilityRepository,
    NobilityBuyRepository,
    PaymentRepository,
    PersonalMallRepository,
    RankingRepository,
    MallCategoriesRepository,
    MallRepository,
    RecommendRepository,
    RoomChangeActionRepository,
    RoomRepository,
    ScreenRepository,
    SingleRoomRepository,
    TeenagerRepository,
    ThemeRepository,
    UserAuthRepository,
    IndexRepository,
    OrderRepository,
    UserBankRepository,
    UserLabelRepository,
    UserDeviceRepository,
    UserRechargeRepository,
    RoomInteractionRepository,
    AppVersionRepository,
    InteractionFaceRepository,
    RoomBackgroundRepository,
    CustomerServiceQuestionRepository,
    UserRoomRepository,
    UserWithdrawalWhitelistRepository};

class RepositoryServiceProvider extends ServiceProvider
{

    //register
    public function register()
    {
        // 任务相关
        $this->task();

        //Continue...
        $this->app->singleton('repo_mall_categories', MallCategoriesRepository::class);
        $this->app->singleton('repo_mall', MallRepository::class);
        $this->app->singleton('repo_about', AboutRepository::class);
        $this->app->singleton('repo_user_data', UserDataRepository::class);
        $this->app->singleton('repo_region', RegionRoomRepository::class);
        $this->app->singleton('repo_user_label', UserLabelRepository::class);
        $this->app->singleton('repo_ad', AdRepository::class);
        $this->app->singleton('repo_account_log', AccountLogRepository::class);
        $this->app->singleton('repo_article', ArticleRepository::class);
        $this->app->singleton('repo_lisence', LisenceRepository::class);
        $this->app->singleton('repo_user_auth', UserAuthRepository::class);
        $this->app->singleton('repo_user', UserRepository::class);
        $this->app->singleton('repo_connection', ConnectionRepository::class);
        $this->app->singleton('repo_user_room', UserRoomRepository::class);

        $this->app->singleton('repo_index', IndexRepository::class);
        $this->app->singleton('repo_room', RoomRepository::class);
        $this->app->singleton('repo_order', OrderRepository::class);
        $this->app->singleton('repo_game_entrance', GameEntranceRepository::class);

        $this->app->singleton('repo_badge', BadgeRepository::class);

        $this->app->singleton('repo_mall_products', MallProductsRepository::class);


        $this->app->singleton('repo_treasure_log', TreasureLogRepository::class);
        $this->app->singleton('repo_reward', RewardRepository::class);

        $this->app->singleton('repo_action_hook', ActionHookRepository::class);
        $this->app->singleton('repo_config', ConfigRepository::class);   //引入配置repo

        $this->app->singleton('repo_week_star', WeekStarRepository::class);
        $this->app->singleton('repo_protect', ProtectRepository::class);
        $this->app->singleton('repo_auction', AuctionRepository::class);
        $this->app->singleton('repo_protect', ProtectRepository::class);
        $this->app->singleton('repo_gift', GiftRepository::class);
        $this->app->singleton('repo_single_room', SingleRoomRepository::class);

        $this->app->singleton('repo_theme', ThemeRepository::class);

        $this->app->singleton('repo_recommend', RecommendRepository::class);
        $this->app->singleton('repo_ranking', RankingRepository::class);
        $this->app->singleton('repo_friend', FriendRepository::class);
        $this->app->singleton('repo_follow', FollowRepository::class);

        $this->app->singleton('repo_teenager', TeenagerRepository::class);
        $this->app->singleton('repo_feed_back', FeedBackRepository::class);
        $this->app->singleton('repo_user_device', UserDeviceRepository::class);
        $this->app->singleton('repo_customer_service_question', CustomerServiceQuestionRepository::class);
        $this->app->singleton('repo_user_withdrawal_whitelist', UserWithdrawalWhitelistRepository::class);
        //支付
        $this->app->singleton('repo_payment', PaymentRepository::class);
        $this->app->singleton('repo_nobility_buy', NobilityBuyRepository::class);
        $this->app->singleton('repo_user_recharge', UserRechargeRepository::class);
        $this->app->singleton('repo_user_bank', UserBankRepository::class);
        $this->app->singleton('repo_room_change_action', RoomChangeActionRepository::class);
        $this->app->singleton('repo_personal_mall', PersonalMallRepository::class);
        //房间互动
        $this->app->singleton('repo_room_interaction', RoomInteractionRepository::class);
        // app版本相关
        $this->app->singleton('repo_app_version', AppVersionRepository::class);
        // 互动表情功能
        $this->app->singleton('repo_interaction_face', InteractionFaceRepository::class);

        // 背景墙
        $this->app->singleton('repo_room_background', RoomBackgroundRepository::class);
        //我要上公屏
        $this->app->singleton('repo_screen', ScreenRepository::class);

        $this->app->singleton('repo_new_connect', ConnectRepository::class);

        $this->app->singleton('repo_add_pool', AddPoolRepository::class);
        $this->app->singleton('repo_add_pool_stellar', AddPoolStellarRepository::class);
        $this->app->singleton('repo_add_pool_senior', AddPoolSeniorRepository::class);
        $this->app->singleton('repo_add_pool_gashapon', AddPoolGashaponRepository::class);
        $this->app->singleton('repo_add_pool_fantasy', AddPoolFantasyRepository::class);
        $this->app->singleton('repo_add_pool_frag', AddPoolFragRepository::class);
        // 暴击金币 游戏
        $this->app->singleton('repo_game_lucky', StrikeRepositories::class);
        $this->app->singleton('repo_nobility', NobilityRepository::class);

        //活动相关
        $this->activity();
    }

    public function task()
    {
        $this->app->singleton('repo_task', TaskRepository::class);
        $this->app->singleton('repo_every_day_task', EveryDayTaskRepository::class);
        $this->app->singleton('repo_task_update', TaskUpdateRepository::class);
        $this->app->singleton('repo_new_player_task', NewPlayerTaskRepository::class);
    }

    private function activity()
    {
        $this->app->singleton('repo_accumulate_recharge', AccumulateRechargeRepository::class);
        $this->app->singleton('repo_new_year', NewYearRepository::class);
        $this->app->singleton('repo_activity_sign', ActivitySignRepository::class);

    }
}
